﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Gds.Model.ConfigModel.ClientConfig
{
    public class ClientPortModel:INotifyPropertyChanged
    {
        private bool  _isOpen;
        private string _serverTotalLine;
        private string _serverCAddr;
        private string _clientPort;
        /// <summary>
        /// 是否启用
        /// </summary>
        public bool IsOpen
        {
            get { return _isOpen; }
            set { _isOpen = value; OnPropertyChanged(nameof(IsOpen)); }
        }
        /// <summary>
        /// 服务器总线配置
        /// </summary>
        public string ServerTotalLine
        {
            get { return _serverTotalLine; }
            set { _serverTotalLine = value;OnPropertyChanged(nameof(ServerTotalLine)); }
        }
        /// <summary>
        /// 服务器控制器地址
        /// </summary>
        public string ServerCAddr
        {
            get { return _serverCAddr; }
            set { _serverCAddr = value; OnPropertyChanged(nameof(ServerCAddr)); }
        }
        /// <summary>
        /// 客户端对应端口号
        /// </summary>
        public string ClientPort
        {
            get { return _clientPort; }
            set { _clientPort = value; OnPropertyChanged(nameof(ClientPort)); }
        }
        public event PropertyChangedEventHandler PropertyChanged;
        public virtual void OnPropertyChanged(string propertyName)
        {
            if (PropertyChanged != null)
            {
                PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
            }
        }
    }
}
